package checkers3d.presentation;

//Passes events to IInputObserver
import java.awt.*;
import java.awt.event.*;

public class InteractiveWindowNativeClickDetector implements MouseListener, KeyListener
{

	public IInputObserver userListener;

	public InteractiveWindowNativeClickDetector(IInputObserver someListener)
	{
    		userListener = someListener;
	}

	public void mousePressed (MouseEvent event) //passes the location where the mouse was pressed
	{
		userListener.onClick (event.getPoint());
	}

	public void mouseClicked (MouseEvent event) //empty method
	{

	}

	public void mouseReleased (MouseEvent event) //empty method
	{

	}

	public void mouseEntered (MouseEvent event) //empty method
	{

	}

	public void mouseExited (MouseEvent event) //empty method
	{

	}



	public void keyPressed (KeyEvent event)
	{

	}

	public void keyTyped (KeyEvent event)
	{
		userListener.onKeyPress (event.getKeyChar());
	}

	public void keyReleased (KeyEvent event)
	{

	}



}
